

<!DOCTYPE html>
<html>

<head>
   
    
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

<!--360浏览器优先以webkit内核解析-->


<title>TI新增费用申请</title>

<link rel="shortcut icon" href="__STATIC__/layout/favicon.ico">
<link href="__STATIC__/layout/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
<link href="__STATIC__/layout/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
<link href="__STATIC__/layout/css/animate.css" rel="stylesheet">
<link href="__STATIC__/layout/css/style.css?v=4.1.0" rel="stylesheet">
<link href="__STATIC__/layout/css/channel.css?v=4.1.0" rel="stylesheet">
<!-- Sweet Alert -->
<link href="__STATIC__/layout/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">


    <link rel="stylesheet" href="__STATIC__/layout/css/demo.css" type="text/css">
    <link href="__STATIC__/layout/css/gyq.css" rel="stylesheet">
    <style>
        .handup{
            color: #a6e1fc;
            display: inline-block;
            padding-left: 10px;
            cursor: pointer;
        }
       .btn-white.active{
            color: #fff;
            background-color: #337ab7;
        }
    </style>

</head>

<body class="white-bg" style="padding: 3px;font-size: 13px">
    <div class="page-heade">
       <h2 class="title_color text-center">TI费用申请</h2>
    </div>
    <form action="" class="form-inline" id="form1">
        <table class="table table-bordered bud_hei" style="margin-bottom: 10px">
            <tr>
                <td style="" class="text-center">活动主题：</td>
                <td colspan="3">
                    <div class="form-group">
                     <input type="text" name="" ret="活动主题不能为空" class="form-control" placeholder="请输入活动主题" id="actionTheme">
                    </div>
                   
                </td> 
                <td style="" class="text-center">活动经销商：</td>
                <td colspan="3" id="testNoBtn" >
                </td>
               </tr>
                <tr>
                <td class="text-center">是否新进货&nbsp;<span class="fa fa-question-circle" data-toggle="tooltip" data-placement="right" title="Tooltip on left"></span></td>
                <td>
                 <div class="btn-group">
                    <label class="btn btn-white" style="position: relative;">
                         <input type="radio" name="options" id="option1" autocomplete="off" style="opacity: 0;position: absolute;">进货
                     </label>
                     <label class="btn btn-white active" style="position: relative;">
                         <input type="radio" name="options" id="option2" autocomplete="off" checked style="opacity: 0;position: absolute;"> 不进货
                     </label>
                 </div>
                </td>
                <td style="width: 80px" class="text-right">进货时段</td>
                   <td>  
                      <input type="text" class="form-control" type2="text" ret="进货时段不能为空" id="jinhuotime" style="width: 220px" disabled="true" placeholder="开始时间 至 结束时间">
                    </td>
                    <td style="" class="text-center">承诺进货额：</td>
                     <td>
                    <div class="input-group">
                        <input type="text" class="form-control" type2="text" ret="承诺进货额不能为空" aria-label="RMB" style="width: 60px;height: 30px" disabled="true">
                         <span class="input-group-addon">元</span>
                        </div>
                    </td>
                    <td class="text-center">预计进货费比&nbsp;<span class="fa fa-question-circle" data-toggle="tooltip" data-placement="left" title="注：预计进货费比=总预计费用额/承诺进货额"></span></td>
                   <td>
                    <div class="input-group">
                        <input type="text" class="form-control" aria-label="" style="width: 60px;height: 30px" disabled="true">
                         <span class="input-group-addon">%</span>
                        </div>
                   </td>
                </tr>
                <!--<tr>-->
                    <!--<td style="width: 120px" class="text-center">-->
                        <!--使用角色&nbsp;<span class="fa fa-question-circle" data-toggle="tooltip" data-placement="right" title="Tooltip on left"></span>-->
                    <!--</td>-->
                    <!--<td colspan="7">-->
                         <!--<div class="input-group form-group" style="display: inline-block;" id="selectDivangency1">-->
                                        <!--<input type="text" class="form-control" id="testNoBtn2">-->
                                        <!--<div class="input-group-btn">-->
                                            <!--<ul class="dropdown-menu dropdown-menu-right" role="menu">-->
                                            <!--</ul>-->
                                        <!--</div>-->
                  <!--</div>-->

                    </td>
                </tr>
        </table>
        <p class="text-right">金额单位：元</p>
        <div>
            <a href="javascript:;" class="btn btn-info" id="addfreeMIngxi" onclick="ifInputNullGto();"><span class="fa fa-plus-circle"></span>&nbsp;添加费用明细</a>&nbsp;&nbsp;
            <a href="javascript:;" class="btn btn-success" style="color: #fff;">基本信息</a>
        </div>
        <table class="table table-bordered table-striped">
            <thead>
                <tr class="info">
                    <th class="text-center">操作</th>
                    <th class="text-center">活动期间</th>
                    <th class="text-center">活动描述</th>
                    <th class="text-center">活动产品</th>
                    <th class="text-center">活动系统名/网点数</th>
                    <th class="text-center">费用类型</th>
                    <th class="text-center">费用额</th>
                    <th class="text-center">支付方式</th>
                    <th class="text-center">费用说明</th>
                    <th class="text-center">不做活动销量</th>
                    <th class="text-center">做活动销量</th>
                    <th class="text-center">费用率</th>
                    <th class="text-center">ROI</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                   <td class="text-center">
                     <button class="btn btn-info btn-circle btn-sm" type="button" title="修改"><i class="fa fa-pencil-square-o"></i></button><br>
                     <button class="btn btn-warning btn-circle btn-sm" type="button" title="删除"><i class="fa fa-times"></i></button>
                   </td>
                   <td>
                    <p>2018-06-13</p>
                    <p>2018-07-04</p>
                    <p>共22天</p>
                  </td>
                   <td>123123</td>
                   <td>
                        <p>40克舒爽爱牙乐儿童牙膏草莓味</p>
                        <p class="spanTotal">共<span>1</span>个单品</p>
                   </td>
                   <td>
                        <p>长沙沃尔玛/<span>4</span>家</p>
                        <p class="spanTotal">共<span>1</span>个系统</p>
                   </td>
                   <td>样酒</td>
                   <td class="text-right">23213.00</td>
                   <td>事后货补</td>
                   <td></td>
                   <td class="text-right">12.00</td>
                   <td class="text-right">11.00</td>
                   <td class="text-right">211027.27%</td>
                   <td class="text-right">-0.00%</td>
                </tr>
            </tbody>
            <tfoot>
                <tr class="trTotal text-right">
                    <td colspan="5">合计</td>
                    <td></td>
                    <td>23213.00</td>
                    <td></td>
                    <td></td>
                    <td>12.00</td>
                    <td>11.00</td>
                    <td>211027.27%</td>
                    <td>0.00%</td>
                </tr>
            </tfoot>
        </table>
         <div class="alert alert-warning" id="applyresult" style="margin-bottom: 4px;">
            本申请中：样酒：23213.00元；总费用：23213.00元。总预计销量：11.00元；总费用率：211027.27%；总ROI：0%；
        </div>
        <div class="alert alert-warning">
          费用申请说明：1、如未达到当月承诺未税进货金额，则促销费用按实际未税进货金额比例相应减少
        </div>
      <div class="alert alert-success">
        <button class="btn btn-primary">上传附件</button>&nbsp;
        <a href="javascript:;" class="btn btn-white">附件说明&nbsp;&nbsp;<span class="fa fa-question-circle" data-toggle="tooltip" data-placement="right" title="Tooltip on left"></span></a>
      </div>
      <div class="row-margin-top text-center">
        <input type="button" name="" id="savecg" value="保存草稿" class="btn btn-info">&nbsp;&nbsp;
        <input type="button" name="" id="savetj" value="保存并提交流程" class="btn btn-success">&nbsp;&nbsp;
        <input type="button" name="" id="toback" value="返回" class="btn btn-warning" onclick="back()">
      </div>
    </form>
   
<!-- 全局js -->

<script src="__STATIC__/layout/js/jquery.min.js"></script>
<script src="__STATIC__/layout/js/contabs_sub.js"></script>
<script src="__STATIC__/layout/js/common.js"></script>
<script src="__STATIC__/layout/js/bootstrap.min.js?v=3.3.6"></script>
<!-- Sweet alert -->
<script src="__STATIC__/layout/js/plugins/sweetalert/sweetalert.min.js"></script>
 <script src="__STATIC__/layout/js/plugins/laydate/laydate.js"></script>
<script src="__STATIC__/layout/js/plugins/layer/layer.min.js"></script>
<script src="__STATIC__/layout/js/plugins/suggest/bootstrap-suggest.min.js"></script>
<script src="__STATIC__/xds/js/select.js"></script>
<script>
    entranceX('testNoBtn',"{:url('select/myjxsjson')}",'{:url("BiHaiChaoSheng/selectList?str=testNoBtn&url=myzonetreeajax")}','经销商不能为空','');
    $(function () {
            $('[data-toggle="tooltip"]').tooltip()
    })
    $(document).ready(function () {
        /*设置select*/

        $("#selectDivangency").css("width","50%");
        $("#selectDivangency1").css("width","20%");

        laydate.render({
         elem: '#jinhuotime',
         range: '至',
         format: 'yyyy-M-d',
        });
    })   


$('input[type="text"]').each(function(){
    if($(this).val()=="" && $(this).attr('disabled')!='true' && $(this).attr('id')!='jinhuotime'){
        $(this).parent('.form-group').addClass("has-error")
    }else{
       $(this).parent('.form-group').removeClass("has-error")   
    }
})
$('input[type="text"]').keyup(function(){
     if($(this).val()=="" && $(this).attr('disabled')!='true' && $(this).attr('id')!='jinhuotime'){
        $(this).parent('.form-group').addClass("has-error")
    }else{
       $(this).parent('.form-group').removeClass("has-error")   
    }
})

/*进货or不进货*/
$("#option1").click(function(){
        // console.log(1)
     $(this).parents('td').siblings().find('input[type2="text"]').attr('disabled',false)
     $(this).parent('label').siblings().removeClass('active')
     $(this).parent('label').addClass('active')
})
$("#option2").click(function(){
     $(this).parents('td').siblings().find('input[type2="text"]').attr('disabled',true)
     $(this).parent('label').siblings().removeClass('active')
     $(this).parent('label').addClass('active')
})


   function ifInputNullGto() {
       ifInputNull('#addfreeMIngxi',function () {
           var testNoBtn = $("input[name='testNoBtn']").val();
           var tUrl = "{:url('other/addfreemingxi')}"+'?jxsid='+testNoBtn;

           layer.open({
               type: 2,
               title: '添加费用明细',
               area: ['90%', '90%'],
               fixed: false, //不固定
               maxmin: true,
               /*btn:["保存","返回"],*/
               content:tUrl
           });
           return false
       });
   }


</script>
</body>

</html>